package cn.niit;

import cn.niit.service.impl.UserServiceImpl;
import cn.niit.service.impl.UserServiceProxy;

/**
 * @title: Client
 * @Author Zhj
 * @Date: 2021/10/13 19:33
 * @Version 1.0
 */
public class Client {
    public static void main(String[] args){
        //真实业务
        UserServiceImpl userService = new UserServiceImpl();
        //代理类
        UserServiceProxy proxy = new UserServiceProxy();
        //使用代理类实现日志功能
        proxy.setUserService(userService);
        proxy.add();
        proxy.delete();
        proxy.update();
        proxy.query();
    }
}
